package com.hl.order.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hl.order.mapper.OrderGoodsMapper;
import com.hl.order.domain.OrderGoods;
import com.hl.order.service.IOrderGoodsService;

/**
 * 订单商品表管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-08
 */
@Service
public class OrderGoodsServiceImpl implements IOrderGoodsService 
{
    @Autowired
    private OrderGoodsMapper orderGoodsMapper;

    /**
     * 查询订单商品表管理
     * 
     * @param orderGoodsId 订单商品表管理主键
     * @return 订单商品表管理
     */
    @Override
    public OrderGoods selectOrderGoodsByOrderGoodsId(Long orderGoodsId)
    {
        return orderGoodsMapper.selectOrderGoodsByOrderGoodsId(orderGoodsId);
    }

    /**
     * 查询订单商品表管理列表
     * 
     * @param orderGoods 订单商品表管理
     * @return 订单商品表管理
     */
    @Override
    public List<OrderGoods> selectOrderGoodsList(OrderGoods orderGoods)
    {
        return orderGoodsMapper.selectOrderGoodsList(orderGoods);
    }

    /**
     * 新增订单商品表管理
     * 
     * @param orderGoods 订单商品表管理
     * @return 结果
     */
    @Override
    public int insertOrderGoods(OrderGoods orderGoods)
    {
        return orderGoodsMapper.insertOrderGoods(orderGoods);
    }

    /**
     * 修改订单商品表管理
     * 
     * @param orderGoods 订单商品表管理
     * @return 结果
     */
    @Override
    public int updateOrderGoods(OrderGoods orderGoods)
    {
        return orderGoodsMapper.updateOrderGoods(orderGoods);
    }

    /**
     * 批量删除订单商品表管理
     * 
     * @param orderGoodsIds 需要删除的订单商品表管理主键
     * @return 结果
     */
    @Override
    public int deleteOrderGoodsByOrderGoodsIds(Long[] orderGoodsIds)
    {
        return orderGoodsMapper.deleteOrderGoodsByOrderGoodsIds(orderGoodsIds);
    }

    /**
     * 删除订单商品表管理信息
     * 
     * @param orderGoodsId 订单商品表管理主键
     * @return 结果
     */
    @Override
    public int deleteOrderGoodsByOrderGoodsId(Long orderGoodsId)
    {
        return orderGoodsMapper.deleteOrderGoodsByOrderGoodsId(orderGoodsId);
    }
}
